package com.gk.init
{
	import com.gk.company.control.CompanyStartCommand;
	import com.gk.init.control.InitStartUpCommand;
	import com.gk.init.model.UserInfoModel;
	
	import flash.display.DisplayObjectContainer;
	
	import org.robotlegs.base.ContextEvent;
	import org.robotlegs.mvcs.Context;
	
	public class InitContext extends Context
	{
		public function InitContext(contextView:DisplayObjectContainer=null, autoStartup:Boolean=true)
		{
			super(contextView, autoStartup);
		}
		
		override public function startup():void
		{
			commandMap.mapEvent(ContextEvent.STARTUP,InitStartUpCommand,ContextEvent,true);
			commandMap.mapEvent(ContextEvent.STARTUP,CompanyStartCommand,ContextEvent,true);
			injector.mapSingleton(UserInfoModel);
			
			dispatchEvent(new ContextEvent(ContextEvent.STARTUP));
			
			
		}
		
	}
}